<template>
	<view class="indexs">
		<view class="header header_wi" :style="'padding-top: ' + navH + 'px;'">
			<view class="header_height" :style="'height:' + gaodu + 'px;line-height:' + gaodu + 'px;top:' + gaodutops + 'px;'">
				<view class="index_h_cont3">
					<view class="index_wenben_img" @tap="jumpzuo"><image :src="imgUrl + '/dzx_img33.png'" mode="widthFix"></image></view>
					<view class="index_wenben">{{ $t('page_my_yue.my_balance') }}</view>
				</view>
			</view>
			<view class="coloe_title">s</view>
		</view>
		<view class="index_center" :style="'padding-top:' + (navH + 50) + 'px;'">
			<view class="my_yue_center">
				<view class="my_yue_item1">
					<image :src="imgUrl + '/dzx_img121.png'"></image>
					<view class="my_yue_item1_txt">
						<view class="my_yue_item1_t1">{{ $t('page_my_yue.my_balance') }}（{{ price_mode.unit_name }}）</view>
						<view class="my_yue_item1_dis">
							<view class="my_yue_item1_t2">{{ yuelist.balance }}</view>
							<view class="my_yue_item1_t3" @tap="tiaozhuans" data-url="/pages/mys/my_chongzhi/my_chongzhi">{{ $t('page_my_yue.recharge') }}</view>
						</view>
					</view>
				</view>
				<view class="my_yue_item2">
					<view class="my_yue_item2_list">
						<view class="my_yue_item2_cont" @tap="tiaozhuans" data-url="/pages/mys/my_zhanghu/my_zhanghu">
							<view class="my_yue_item2_l">
								<image :src="imgUrl + '/dzx_img122.png'"></image>
								<text>{{ $t('page_my_yue.account_details') }}</text>
							</view>
							<view class="my_yue_item2_r"><image :src="imgUrl + '/dzx_img17.png'"></image></view>
						</view>
						<!--< view class="my_yue_item2_cont" @tap="tiaozhuans" data-url="/pages/mys/my_tixian/my_tixian">
                            <view class="my_yue_item2_l">
                                <image :src="imgUrl+'/dzx_img123.png'"></image>
                                <text>收益提现</text>
                            </view>
                            <view class="my_yue_item2_r">
                                <text>可提现￥{{ yuelist.income }}</text>
                                <image :src="imgUrl+'/dzx_img17.png'"></image>
                            </view>
                        </view> -->
						<view class="my_yue_item2_cont" @tap="tiaozhuans" data-url="/pages/mys/my_huikuan/my_huikuan">
							<view class="my_yue_item2_l">
								<image :src="imgUrl + '/dzx_img124.png'"></image>
								<text>{{ $t('page_my_yue.remittance_account') }}</text>
							</view>
							<view class="my_yue_item2_r"><image :src="imgUrl + '/dzx_img17.png'"></image></view>
						</view>
						<view class="my_yue_item2_cont" @tap="tiaozhuans" data-url="/pages/mys/my_huikuan_pinzheng/my_huikuan_pinzheng">
							<view class="my_yue_item2_l">
								<image :src="imgUrl + '/dzx_img125.png'"></image>
								<text>{{ $t('page_my_yue.upload_certificate') }}</text>
							</view>
							<view class="my_yue_item2_r"><image :src="imgUrl + '/dzx_img17.png'"></image></view>
						</view>
						<view class="my_yue_item2_cont" @tap="tiaozhuans" data-url="/pages/mys/my_pinzhenglist/my_pinzhenglist">
							<view class="my_yue_item2_l">
								<image :src="imgUrl + '/dzx_img126.png'"></image>
								<text>{{ $t('page_my_yue.credential_record') }}</text>
							</view>
							<view class="my_yue_item2_r"><image :src="imgUrl + '/dzx_img17.png'"></image></view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
// pages/shouye/shouye_zkc/shouye_zkc.js
const app = getApp();

let request = require('../../../utils/require');

export default {
	data() {
		return {
			navH: app.globalData.navHeight,
			gaodu: app.globalData.height,
			gaodutops: app.globalData.top,
			imgUrl: app.globalData.imgUrl,
			price_mode: uni.getStorageSync('price_mode'),
			yuelist: {
				balance: '',
				income: ''
			} //我的余额
		};
	},
	/**
	 * 生命周期函数--监听页面加载
	 */ onLoad() {
		var that = this;
		that.wodeyue();
	},
	onShow() {
		var that = this;
	},
	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function() {},
	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function() {},
	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function() {},
	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function() {},
	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function() {},
	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function() {},
	methods: {
		//我的余额
		wodeyue() {
			var that = this;
			var data = {
				token: uni.getStorageSync('token')
			};
			request.post(`index.php?s=/api/user/banlance&wxapp_id=` + uni.getStorageSync('web_id'), data).then(res => {
				if (res.data.code == 1) {
					console.log(res, 'add');
					that.yuelist= res.data.data
				}
			});
		},

		tiaozhuans(e) {
			uni.navigateTo({
				url: e.currentTarget.dataset.url
			});
		},

		jumpzuo() {
			uni.navigateBack();
		}
	}
};
</script>
<style>
@import './my_yue.css';
</style>
